<template>
	
	<!-- 自定义navbar组件【放在窗体外部，否则被content占据间距】 -->
	<CustomNavbar navTitle='我的' :isTitleStyle="true"></CustomNavbar>
	
	<view>
		<view class="u-flex-y-center u-flex-around user-box u-p-l-30 u-p-r-20 u-p-b-30" style="padding-top: 30rpx;">
			<view class="u-m-r-10">
				<up-avatar :src="avaterUrl" size="100"></up-avatar>
			</view>
			<view class="u-flex-1">
				<view class="u-font-18 u-p-b-20">{{userName}}</view>
				<view class="u-font-14 u-tips-color">微信号:{{nickName}}</view>
			</view>
			<view class="u-m-l-10 u-p-10">
				<up-icon name="scan" color="#969799" size="28"></up-icon>
			</view>
			<view class="u-m-l-10 u-p-10">
				<up-icon name="arrow-right" color="#969799" size="28"></up-icon>
			</view>
		</view>
		
		<view class="u-m-t-20">
			<up-cell-group>
				<up-cell icon="rmb-circle" title="支付"></up-cell>
			</up-cell-group>
		</view>
		
		<view class="u-m-t-20">
			<up-cell-group>
				<up-cell icon="star" title="收藏"></up-cell>
				<up-cell icon="photo" title="相册"></up-cell>
				<up-cell icon="coupon" title="卡券"></up-cell>
				<up-cell icon="heart" title="关注"></up-cell>
			</up-cell-group>
		</view>
		
		<!-- <view class="u-m-t-20">
			<up-cell-group>
				<up-cell icon="setting" title="设置"></up-cell>
			</up-cell-group>
		</view> -->
		
		<!-- 自定义tabbar组件【放在窗体外部，否则占据高度】 -->
		<CustomTabBar currentIndex="2"/>
		
		<CustomAdd path="/pages/test/updata"/>
	</view>
	
</template>

<script>
	import CustomNavbar from '@/components/CustomNavbar.vue'
	import CustomAdd from '@/components/CustomAdd.vue'
	export default {
		data() {
			return {
				avaterUrl: 'https://uviewui.com/common/logo.png', //头像
				userName: '', //账号
				nickName: '', //微信号
			}
		},
		components:{
			CustomNavbar,
			CustomAdd
		},
		onLoad() {
			//更新个人信息
			const userInfo = JSON.parse(uni.getStorageSync("userInfo"))
			this.avaterUrl = userInfo.avaterUrl
			this.userName = userInfo.userName
			this.nickName = userInfo.nickName
		},
		methods: {
			
		}
	}
</script>

<style lang="scss" scoped>
	.camera{
		width: 54px;
		height: 44px;
		
		&:active{
			background-color: #ededed;
		}
	}
	.user-box{
		background-color: #fff;
	}
	.u-cell-group {
		background-color: #fff;
	}
</style>
